﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Media;

namespace Goldlight.SampleApplication.Controls
{
    public class SearchBox : TextBox
    {
        /// <summary>
        /// Static initializer for the <see cref="SearchBox"/>.
        /// </summary>
        static SearchBox()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(SearchBox), new FrameworkPropertyMetadata(typeof(SearchBox)));
        }

        /// <summary>
        /// DependencyProperty for the Watermark text.
        /// </summary>
        public static DependencyProperty WatermarkTextProperty =
            DependencyProperty.Register("WatermarkText", typeof(string), typeof(SearchBox));
        /// <summary>
        /// DependencyProperty for the Watermark color.
        /// </summary>
        public static DependencyProperty WatermarkColorProperty =
            DependencyProperty.Register("WatermarkColor", typeof(Brush), typeof(SearchBox));

        /// <summary>
        /// Get or set the watermark text.
        /// </summary>
        public string WatermarkText
        {
            get { return (string)GetValue(WatermarkTextProperty); }
            set { SetValue(WatermarkTextProperty, value); }
        }
        /// <summary>
        /// Get or set the color of the watermark text.
        /// </summary>
        public Brush WatermarkColor
        {
            get { return (Brush)GetValue(WatermarkColorProperty); }
            set { SetValue(WatermarkColorProperty, value); }
        }
    }
}
